Commits

staltz  committed 1334f06

FIXBUG of encoding of non-ASCII characters in file paths

  • Participants
  • Parent commits 78b7a0e

Comments (0)

Files changed (2)

 + DONE FIXBUG quotes totally supported now. also removed unnecessary commit message quote wrapping
 + DONE FIXBUG windows 7 64-bit with cp850 encoding giving error 'TypeError: invalid arguments' in hypergrasscore.py, line 82
 + DONE version number in the usage description
++ DONE FIXBUG of encoding of non-ASCII characters in file paths
 - NEW wiki page at bitbucket
 >>> 0.9
 

File src/hypergrasscore.py

 	
 	# get rootfolder of repo and todo file name
 	rootfolder = os.path.abspath(os.curdir.decode(sys.stdin.encoding))
-	print('1: '+rootfolder)
-	print(type(rootfolder))
 	if 'HG_PENDING' in os.environ:
 		rootfolder = os.environ['HG_PENDING']
-		print('2: '+rootfolder)
 	elif repo.config('bundle','mainreporoot'):
 		rootfolder = repo.config('bundle','mainreporoot')
-		print('3: '+rootfolder)
-		print(type(rootfolder))
 	else:
 		rootfolder = os.path.abspath(".")
 	todofilename = repo.config('hypergrass','todofile')
 		print('ERROR: todo filename not defined')
 		sys.exit(1)
 
-        print('stdin : '+sys.stdin.encoding)
-        print('stdout: '+sys.stdout.encoding)
-        print('default encoding: '+sys.getdefaultencoding())
-        #print('file sys encoding: '+sys.getfilesystemencoding())
-        #print(rootfolder)
-        #print(type(rootfolder))
-        #print(bytearray(rootfolder,'cp850'))
-        #print(rootfolder.encode('unicode_escape'))
-
-        fullpath = rootfolder + '/' + todofilename
-        print(fullpath)
-        print(type(rootfolder))
-        print(type(todofilename))
-	
 	# quit if todo file does not exist
 	if not os.path.exists(rootfolder+'/'+todofilename):
 		print('ERROR: todo file not found')