diff --git a/Pdfpath.py b/Pdfpath.py index 2c1bc6e..0d5bf9f 100755 --- a/Pdfpath.py +++ b/Pdfpath.py @@ -30,7 +30,8 @@ def getPdfpath(parentpath, mgiID): try: prefix, numeric = mgiID.split(':') - basepath = (int(numeric) / PROJECT_DIR_GROUPING) * PROJECT_DIR_GROUPING + numeric = int(numeric) + basepath = int(numeric / PROJECT_DIR_GROUPING) * PROJECT_DIR_GROUPING return os.path.join( str(parentpath), str(basepath) ) except: raise Exception('Failed to obtain pdf path: %s, %s' % (parentpath, mgiID))