Refactor code
This commit is contained in:
parent
a5dbf73df4
commit
0dc6a0b6c5
3 changed files with 14 additions and 15 deletions
|
@ -556,13 +556,11 @@ class Onionr:
|
|||
return
|
||||
|
||||
def get_hostname(self):
|
||||
retVal = ''
|
||||
try:
|
||||
with open('./data/hs/hostname', 'r') as hostname:
|
||||
retVal = hostname.read()
|
||||
except FileNotFoundError:
|
||||
retVal = None
|
||||
return retVal
|
||||
return hostname.read().strip()
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
def addFile(self):
|
||||
'''command to add a file to the onionr network'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue