DrTrigon has submitted this change and it was merged.

Change subject: bugfix for "IOError: [Errno 2] No such file or directory: 
'/data/project/drtrigonbot/pywikibot-compat/externals/jseg/externals/pydmtx/externals/pycolorname/PMS_cal-print.pkl'"
......................................................................


bugfix for "IOError: [Errno 2] No such file or directory: 
'/data/project/drtrigonbot/pywikibot-compat/externals/jseg/externals/pydmtx/externals/pycolorname/PMS_cal-print.pkl'"

Change-Id: I085ffed30e355e299b5a5b86c69b5247beabed74
---
M helper.py
1 file changed, 2 insertions(+), 10 deletions(-)

Approvals:
  DrTrigon: Verified; Looks good to me, approved



diff --git a/helper.py b/helper.py
index c9e92b0..8f897b1 100644
--- a/helper.py
+++ b/helper.py
@@ -8,16 +8,8 @@
 import pickle, os, sys
 
 
-scriptdir = os.path.dirname(sys.argv[0])
-if not os.path.isabs(scriptdir):
-    scriptdir = os.path.abspath(os.path.join(os.curdir, scriptdir))
-
-target = os.path.join(scriptdir, 'externals/pycolorname')
-path = list(os.path.split(os.path.abspath(os.curdir)))
-if target not in path:
-    path.append( target )
-path.append( '%s' )
-path = os.path.join(*path)
+scriptdir = os.path.dirname(os.path.abspath(__file__))
+path = os.path.join(scriptdir, '%s')
 
 
 def storeData(filename, data):

-- 
To view, visit https://gerrit.wikimedia.org/r/81954
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I085ffed30e355e299b5a5b86c69b5247beabed74
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/pycolorname
Gerrit-Branch: master
Gerrit-Owner: DrTrigon <[email protected]>
Gerrit-Reviewer: DrTrigon <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to