fixed first log

master
Kevin Froman 2019-02-12 22:35:43 -06:00
parent baf9d3a3c6
commit 59603deb6a
2 changed files with 7 additions and 17 deletions

View File

@ -134,7 +134,8 @@ def raw(data, fd = sys.stdout, sensitive = False):
if get_settings() & OUTPUT_TO_CONSOLE: if get_settings() & OUTPUT_TO_CONSOLE:
ts = fd.write('%s\n' % data) ts = fd.write('%s\n' % data)
if get_settings() & OUTPUT_TO_FILE and not sensitive: if get_settings() & OUTPUT_TO_FILE and not sensitive:
if os.path.getsize(_outputfile) < MAX_LOG_SIZE: if os.path.getsize(_outputfile) >= MAX_LOG_SIZE:
return
try: try:
with open(_outputfile, "a+") as f: with open(_outputfile, "a+") as f:
f.write(colors.filter(data) + '\n') f.write(colors.filter(data) + '\n')

View File

@ -207,9 +207,6 @@ class Onionr:
'connect': self.addAddress, 'connect': self.addAddress,
'pex': self.doPEX, 'pex': self.doPEX,
'ui' : self.openUI,
'gui' : self.openUI,
'getpassword': self.printWebPassword, 'getpassword': self.printWebPassword,
'get-password': self.printWebPassword, 'get-password': self.printWebPassword,
'getpwd': self.printWebPassword, 'getpwd': self.printWebPassword,
@ -298,8 +295,6 @@ class Onionr:
with open('%s/%s.dat' % (exportDir, bHash), 'wb') as exportFile: with open('%s/%s.dat' % (exportDir, bHash), 'wb') as exportFile:
exportFile.write(data) exportFile.write(data)
def showDetails(self): def showDetails(self):
details = { details = {
'Node Address' : self.get_hostname(), 'Node Address' : self.get_hostname(),
@ -1062,12 +1057,6 @@ class Onionr:
return data_exists return data_exists
def openUI(self):
url = 'http://127.0.0.1:%s/ui/index.html?timingToken=%s' % (config.get('client.port', 59496), self.onionrUtils.getTimeBypassToken())
logger.info('Opening %s ...' % url)
webbrowser.open(url, new = 1, autoraise = True)
def header(self, message = logger.colors.fg.pink + logger.colors.bold + 'Onionr' + logger.colors.reset + logger.colors.fg.pink + ' has started.'): def header(self, message = logger.colors.fg.pink + logger.colors.bold + 'Onionr' + logger.colors.reset + logger.colors.fg.pink + ' has started.'):
if os.path.exists('static-data/header.txt') and logger.get_level() <= logger.LEVEL_INFO: if os.path.exists('static-data/header.txt') and logger.get_level() <= logger.LEVEL_INFO:
with open('static-data/header.txt', 'rb') as file: with open('static-data/header.txt', 'rb') as file: