Code quality #2176
|
@ -116,10 +116,8 @@ class MyAddress(Screen, HelperMyAddress):
|
|||
text=item['text'], secondary_text=item['secondary_text'],
|
||||
theme_text_color='Custom' if is_enable else 'Primary',
|
||||
text_color=ThemeClsColor,)
|
||||
try:
|
||||
meny.canvas.children[3].rgba = self.canvas_color_black if is_enable else self.canvas_color
|
||||
except Exception:
|
||||
pass
|
||||
meny.canvas.children[3].rgba = \
|
||||
self.canvas_color_black if is_enable else self.canvas_color
|
||||
meny.add_widget(AvatarSampleWidget(
|
||||
source=os.path.join(
|
||||
self.image_dir, "text_images", "{}.png".format(avatar_image_first_letter(
|
||||
|
|
|
@ -40,7 +40,7 @@ def generate_hash(string):
|
|||
try:
|
||||
# make input case insensitive
|
||||
string = str.lower(string)
|
||||
hash_object = hashlib.md5(str.encode(string))
|
||||
hash_object = hashlib.md5(str.encode(string)) # nosec B303
|
||||
print(hash_object.hexdigest())
|
||||
# returned object is a hex string
|
||||
return hash_object.hexdigest()
|
||||
|
|
|
@ -405,13 +405,10 @@ class NavigateApp(MDApp):
|
|||
img_path = os.path.join(
|
||||
self.image_dir, 'default_identicon', '{}.png'.format(self.kivy_state_obj.selected_address)
|
||||
)
|
||||
try:
|
||||
if os.path.exists(img_path):
|
||||
os.remove(img_path)
|
||||
self.root.ids.content_drawer.ids.reset_image.opacity = 0
|
||||
self.root.ids.content_drawer.ids.reset_image.disabled = True
|
||||
except Exception as e:
|
||||
pass
|
||||
if os.path.exists(img_path):
|
||||
os.remove(img_path)
|
||||
self.root.ids.content_drawer.ids.reset_image.opacity = 0
|
||||
self.root.ids.content_drawer.ids.reset_image.disabled = True
|
||||
toast('Avatar reset')
|
||||
|
||||
def get_default_logo(self, instance):
|
||||
|
|
|
@ -479,7 +479,7 @@ class objectProcessor(threading.Thread):
|
|||
logger.info(
|
||||
'EC decryption successful using key associated'
|
||||
' with ripe hash: %s.', hexlify(key))
|
||||
except Exception:
|
||||
except Exception: # nosec B110
|
||||
pass
|
||||
if not initialDecryptionSuccessful:
|
||||
# This is not a message bound for me.
|
||||
|
|
Reference in New Issue
Block a user