Kaydet (Commit) ac7cb054 authored tarafından Jack Jansen's avatar Jack Jansen

Fixed to run better in unix-Python, and to cater for bgenlocations

possibly being missing.
üst 40813b1d
...@@ -25,7 +25,11 @@ try: ...@@ -25,7 +25,11 @@ try:
except ImportError: except ImportError:
MacOS = None MacOS = None
from bgenlocations import CREATOR, INCLUDEDIR try:
from bgenlocations import CREATOR, INCLUDEDIR
except ImportError:
CREATOR = None
INCLUDEDIR = os.curdir
Error = "scantools.Error" Error = "scantools.Error"
...@@ -236,7 +240,7 @@ if missing: raise "Missing Types" ...@@ -236,7 +240,7 @@ if missing: raise "Missing Types"
self.line = "" self.line = ""
def initpaths(self): def initpaths(self):
self.includepath = [':', INCLUDEDIR] self.includepath = [os.curdir, INCLUDEDIR]
def initpatterns(self): def initpatterns(self):
self.head_pat = r"^EXTERN_API[^_]" self.head_pat = r"^EXTERN_API[^_]"
...@@ -263,7 +267,7 @@ if missing: raise "Missing Types" ...@@ -263,7 +267,7 @@ if missing: raise "Missing Types"
setattr(self, name[:-4], prog) setattr(self, name[:-4], prog)
def initosspecifics(self): def initosspecifics(self):
if MacOS: if MacOS and CREATOR:
self.filetype = 'TEXT' self.filetype = 'TEXT'
self.filecreator = CREATOR self.filecreator = CREATOR
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment