Permalink
Browse files

fix global being overwritten #35, fix interactive when using py3k

  • Loading branch information...
fffonion committed Nov 15, 2017
1 parent 1998809 commit 15a3189568909de6473d52d1ac40e9bbffd626ea
Showing with 4 additions and 3 deletions.
  1. +1 −1 xeHentai/cli.py
  2. +3 −2 xeHentai/util/__init__.py
View
@@ -197,7 +197,7 @@ def _readline(x, default = ""):
x = x % default
_ = input(logger.safestr(x)) if PY3K else raw_input(logger.safestr(x))
_ = _ or default
return _.decode(locale.getdefaultlocale()[1] or 'utf-8')
return _ if PY3K else _.decode(locale.getdefaultlocale()[1] or 'utf-8')
if not xeH.has_login and _readline(i18n.PS_LOGIN) == 'y':
uname = pwd = ""
@@ -16,6 +16,9 @@
else:# assume posix
filename_filter = re.compile("[\/:]")
if PY3K:
unichr = chr
def parse_cookie(coostr):
ret = {}
for coo in coostr.split(";"):
@@ -63,8 +66,6 @@ def parse_human_time(s):
return rt
def htmlescape(s):
if PY3K:
unichr = chr
def replc(match):
#print match.group(0),match.group(1),match.group(2)
dict={'amp':'&','nbsp':' ','quot':'"','lt':'<','gt':'>','copy':'©','reg':'®'}

0 comments on commit 15a3189

Please sign in to comment.