minor bug fix, both issue 80 and 20 are done

This commit is contained in:
doctor_dev 2025-06-06 21:00:10 +00:00
parent 14231fff92
commit fde645fd60
No known key found for this signature in database
GPG key ID: F12F7F71CB84AEAA
3 changed files with 32 additions and 8 deletions

View file

@ -28,8 +28,12 @@ def get_current_instance():
#expanduser gives the current user directory
instance_file = os.path.expanduser("~") + '/.darknet_participant_url'
with open(instance_file) as f:
return f.read().rstrip()
if os.path.exists(instance_file):
with open(instance_file) as f:
return f.read().rstrip()
else:
return ""
#Set the local dir on script run
conf.LOCAL_DIR = conf.PARTICIPANT_DIR + get_current_instance() + '/'