From 815569288668888bbd0df549f615a0813bfcb648 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Tue, 3 Jul 2018 00:12:08 -0700 Subject: gkeysgen/actions.py: Use gkeys py_input and _unicode declarations Signed-off-by: Brian Dolbec --- gkeys-gen/gkeygen/actions.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gkeys-gen/gkeygen/actions.py b/gkeys-gen/gkeygen/actions.py index bd4a6ef..fc7a801 100644 --- a/gkeys-gen/gkeygen/actions.py +++ b/gkeys-gen/gkeygen/actions.py @@ -19,13 +19,13 @@ from collections import OrderedDict if sys.version_info[0] >= 3: from urllib.request import urlopen - py_input = input - _unicode = str else: from urllib2 import urlopen - py_input = raw_input - _unicode = unicode +from gkeys import ( + py_input, + _unicode, +) from gkeys.fileops import ensure_dirs from gkeys import log @@ -140,7 +140,7 @@ class Actions(object): shutil.copy(skelconfpath, newgpgconfpath) with open(newgpgconfpath, 'a') as conf: for line in urlopen(self.config.get_key('gpg-urls', args.spec)): - conf.write(_unicode(line.decode('utf-8'))) + conf.write(_unicode(line.decode('utf-8'))) def genkey(self, args): -- cgit v1.2.3-65-gdbad