Skip to content

Commit

Permalink
Fix incomplete port to python3
Browse files Browse the repository at this point in the history
Call xdg-user-dirs-update to update xdg directories before
looking for any user directory.

Signed-off-by: Chihurumnaya Ibiam <[email protected]>
  • Loading branch information
chimosky committed Sep 26, 2024
1 parent d9ab681 commit 941b996
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/jarabe/journal/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,7 @@ def get_documents_path():
return _documents_path

try:
subprocess.run(['xdg-user-dirs-update'])
pipe = subprocess.Popen(['xdg-user-dir', 'DOCUMENTS'],
stdout=subprocess.PIPE)
documents_path = os.path.normpath(
Expand Down
2 changes: 1 addition & 1 deletion src/jarabe/view/customizebundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def generate_unique_id():
nick = profile.get_nick_name()
pubkey = profile.get_pubkey()
m = hashlib.sha1()
m.update(pubkey)
m.update(pubkey.encode())
hexhash = m.hexdigest()

nick_letters = "".join([x for x in nick if x.isalpha()])
Expand Down

0 comments on commit 941b996

Please sign in to comment.