Skip to content

Commit

Permalink
make it possible to skip 'sha1'
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Mar 29, 2023
1 parent 239602d commit 77cacbb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions xpra/scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ def main(script_file, cmdline):
def nomd5(*_args):
raise ValueError("md5 support is disabled")
hashlib.md5 = nomd5
if envbool("XPRA_SHA1", False):
import hashlib # @Reimport
try:
hashlib.algorithms_available.remove("sha1") # @UndefinedVariable
except KeyError:
pass
else:
def nosha1(*_args):
raise ValueError("sha1 support is disabled")
hashlib.sha1 = nosha1

def debug_exc(msg="run_mode error"):
get_util_logger().debug(msg, exc_info=True)
Expand Down

0 comments on commit 77cacbb

Please sign in to comment.