aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/util.py
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageialinux-online.org>2015-10-10 09:16:26 +0200
committerPapoteur <papoteur@mageialinux-online.org>2015-10-10 09:16:26 +0200
commit142d404aa8cffc9f4785e5347f26036463dedcd4 (patch)
treec58f4d5c692c945eb10180baadb123d2c3762ad3 /MgaRepo/util.py
parent3e3e90e699192df60eeafb2ec7a9e087aff97195 (diff)
downloadmgarepo-142d404aa8cffc9f4785e5347f26036463dedcd4.tar
mgarepo-142d404aa8cffc9f4785e5347f26036463dedcd4.tar.gz
mgarepo-142d404aa8cffc9f4785e5347f26036463dedcd4.tar.bz2
mgarepo-142d404aa8cffc9f4785e5347f26036463dedcd4.tar.xz
mgarepo-142d404aa8cffc9f4785e5347f26036463dedcd4.zip
Apply 2to3-3.4
Diffstat (limited to 'MgaRepo/util.py')
-rw-r--r--MgaRepo/util.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/MgaRepo/util.py b/MgaRepo/util.py
index 54348d6..8271aec 100644
--- a/MgaRepo/util.py
+++ b/MgaRepo/util.py
@@ -8,7 +8,7 @@ import sys
import os
import re
import select
-from cStringIO import StringIO
+from io import StringIO
import httplib2
#import commands
@@ -64,11 +64,11 @@ def execcmd(*cmd, **kwargs):
verbose = config.getbool("global", "verbose", 0)
if status != 0 and not kwargs.get("noerror"):
if kwargs.get("cleanerr") and not verbose:
- raise Error, output
+ raise Error(output)
else:
- raise Error, "command failed: %s\n%s\n" % (cmdstr, output)
+ raise Error("command failed: %s\n%s\n" % (cmdstr, output))
if verbose:
- print cmdstr
+ print(cmdstr)
sys.stdout.write(output)
return status, output
@@ -78,7 +78,7 @@ def get_auth(username=None, password=None):
if not username:
username = config.get("auth", "username")
if not username:
- username = raw_input("username: ")
+ username = input("username: ")
else:
set_username = 0
if not password:
@@ -108,7 +108,7 @@ def mapurl(url):
else:
try:
newurl = re.sub(expr_, replace, url)
- except re.error, errmsg:
+ except re.error as errmsg:
sys.stderr.write("error in URL mapping regexp: %s" % errmsg)
return newurl