diff orpg/dirpath/__init__.py @ 10:5df1340bda13 grumpy-goblin

Big patch! Linux GUI, Fetching Dict., Init2, Streaming lining.
author sirebral
date Tue, 21 Jul 2009 17:19:53 -0500
parents 4385a7d0efd1
children ff154cf3350c
line wrap: on
line diff
--- a/orpg/dirpath/__init__.py	Sat Jul 18 11:41:05 2009 -0500
+++ b/orpg/dirpath/__init__.py	Tue Jul 21 17:19:53 2009 -0500
@@ -10,7 +10,11 @@
 # -----------------------------
 # * Reworked path verification process to attempt to fall back on the
 #   current working directory if approot fails to verify before
-#   asking the user to locate the root directory -- Snowdog 12-20-05
+#   asking the user to locate the root directory -- Snowdog 12-20-05
+# -----------------------------
+# * Removed reference to approot. It was a superflous creation that carried an object
+#   that dirpath_tools already creates. It wasted system resources by creating a files
+#   and by referencing a file to fill an object that was already created. -- SirEbral 07-19-09
 
 import sys
 import os
@@ -18,16 +22,11 @@
 
 root_dir = None
 
-try:
-    import approot
-    root_dir = approot.basedir
-except:
-    #attempt to load default path
-    t = __file__.split(os.sep)
-    if len(t) > 2:
-        root_dir = os.sep.join(t[:-3])
-    else:
-        root_dir = os.getcwd()   #default ORPG root dir
+t = __file__.split(os.sep)
+if len(t) > 2:
+    root_dir = os.sep.join(t[:-3])
+else:
+    root_dir = os.getcwd()   #default ORPG root dir
 
 dir_struct = {}
 
@@ -43,4 +42,4 @@
 clean = str.replace(clean,'\\','/')
 print "Rooting OpenRPG at: " + clean
 
-load_paths(dir_struct, root_dir)
\ No newline at end of file
+load_paths(dir_struct, root_dir)