|
@@ -20,6 +20,7 @@ from __future__ import print_function
|
|
|
|
|
|
import os
|
|
|
import subprocess
|
|
|
+import sys
|
|
|
|
|
|
from lib_stov import stov_exceptions
|
|
|
|
|
@@ -95,7 +96,7 @@ class conf(object):
|
|
|
except IOError:
|
|
|
raise stov_exceptions.ConfigFileWriteErrorException()
|
|
|
else:
|
|
|
- for key in self.values.iterkeys():
|
|
|
+ for key in self.values.items():
|
|
|
configfile.write(key.upper() + "=" + self.values[key] +
|
|
|
"\n")
|
|
|
configfile.close()
|
|
@@ -217,9 +218,13 @@ class conf(object):
|
|
|
"displayed in brackets.\n"
|
|
|
"Please specify now :\n"))
|
|
|
for value in self.__explanations:
|
|
|
- print(self.__explanations[value] + " [" + self.values[value] + "]:"
|
|
|
- " ")
|
|
|
- user_input = raw_input()
|
|
|
+ print(self.__explanations[value] + " [" + self.values[value] +
|
|
|
+ "]:" +
|
|
|
+ " ")
|
|
|
+ if sys.version_info >= (3, 0):
|
|
|
+ user_input = input()
|
|
|
+ else:
|
|
|
+ user_input = raw_input()
|
|
|
if user_input != "":
|
|
|
self.values[value] = user_input
|
|
|
self.dbpath = str(os.environ['HOME']) + "/.stov/" + \
|