Codebase list python-faraday / 8785c6a
Refresh patch remove-unwanted-checks Sophie Brun 8 years ago
2 changed file(s) with 38 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
11
22 * Import new upstream release
33 * Update debian/copyright
4 * Refresh patch remove-unwanted-checks
45
56 -- Sophie Brun <[email protected]> Tue, 20 Oct 2015 10:34:11 +0200
67
44 import platform
55 import subprocess
66 -import pip
7 import json
78
89 from utils.logs import getLogger, setUpLogger
9 sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '/external_libs/lib/python2.7/dist-packages')
10 @@ -188,42 +187,6 @@ def query_user_bool(question, default=Tr
10 @@ -190,42 +189,6 @@ def query_user_bool(question, default=Tr
1111 "(or 'y' or 'n').\n")
1212
1313
5050
5151 def startProfiler(app, output, depth):
5252 """Profiler handler.
53 @@ -491,39 +454,6 @@ _/ ____\_____ ____________ __| _/__
53 @@ -493,39 +456,6 @@ _/ ____\_____ ____________ __| _/__
5454 print(Fore.RESET + Back.RESET + Style.RESET_ALL)
5555 logger.info("Starting Faraday IDE.")
5656
9090
9191 def checkCouchUrl():
9292 import requests
93 @@ -562,20 +492,11 @@ def main():
93 @@ -542,29 +472,7 @@ def checkCouchUrl():
94 # Non fatal error
95 pass
96
97 -def checkVersion():
98 - try:
99 - f = open(CONST_VERSION_FILE)
100 - f_version = f.read().strip()
101 - if not args.update:
102 - if getInstanceConfiguration().getVersion() != None and getInstanceConfiguration().getVersion() != f_version:
103 - logger.warning("You have different version of Faraday since your last run.\nRun ./faraday.py --update to update configuration!")
104 - if query_yes_no('Do you want to close Faraday?', 'yes'):
105 - exit(-1)
106 -
107 - getInstanceConfiguration().setVersion(f_version)
108 - f.close()
109 -
110 - doc = {"ver": getInstanceConfiguration().getVersion()}
111 -
112 - if os.path.isfile(CONST_CONFIG):
113 - os.remove(CONST_CONFIG)
114 - with open(CONST_CONFIG, "w") as doc_file:
115 - json.dump(doc, doc_file)
116 - except Exception as e:
117 - getLogger("launcher").error("It seems that something's wrong with your version\nPlease contact customer support")
118 - exit(-1)
119 -
120 +
121
122 def init():
123 """Initializes what is needed before starting.
124 @@ -587,21 +495,12 @@ def main():
94125 """
95126
96127 init()
102133 - checkConfiguration()
103134 - setConf()
104135 - checkCouchUrl()
136 - checkVersion()
105137 - setUpLogger()
106138 - update()
107139 - checkUpdates()
112144 + logger.info("Dependencies met.")
113145 + checkConfiguration()
114146 + setConf()
147 + checkCouchUrl()
115148 + startFaraday()
116149
117150