@@ -274,7 +274,7 @@ def get_history(self, path, history_file, version, row_type):
274274 while compatible_version not in list (query .keys ()) and compatible_version > 0 :
275275 compatible_version -= 1
276276
277- if compatible_version is not 0 :
277+ if compatible_version != 0 :
278278 log .info (f' - Using SQL query for History items for Chrome { compatible_version } ' )
279279 try :
280280 # Copy and connect to copy of 'History' SQLite DB
@@ -344,7 +344,7 @@ def get_media_history(self, path, history_file, version, row_type):
344344 while compatible_version not in list (query .keys ()) and compatible_version > 0 :
345345 compatible_version -= 1
346346
347- if compatible_version is not 0 :
347+ if compatible_version != 0 :
348348 log .info (f' - Using SQL query for Media History items for Chrome { compatible_version } ' )
349349 try :
350350 # Copy and connect to copy of 'Media History' SQLite DB
@@ -430,7 +430,7 @@ def get_downloads(self, path, database, version, row_type):
430430 while compatible_version not in list (query .keys ()) and compatible_version > 0 :
431431 compatible_version -= 1
432432
433- if compatible_version is not 0 :
433+ if compatible_version != 0 :
434434 log .info (f' - Using SQL query for Download items for Chrome v{ compatible_version } ' )
435435 try :
436436 # Copy and connect to copy of 'History' SQLite DB
@@ -517,13 +517,13 @@ def clean(x):
517517 if encrypted_value is not None :
518518 if len (encrypted_value ) >= 2 :
519519 # If running Chrome on Windows
520- if sys .platform == 'win32' and self .available_decrypts ['windows' ] is 1 :
520+ if sys .platform == 'win32' and self .available_decrypts ['windows' ] == 1 :
521521 try :
522522 decrypted_value = win32crypt .CryptUnprotectData (encrypted_value , None , None , None , 0 )[1 ]
523523 except :
524524 decrypted_value = "<encrypted>"
525525 # If running Chrome on OSX
526- elif sys .platform == 'darwin' and self .available_decrypts ['mac' ] is 1 :
526+ elif sys .platform == 'darwin' and self .available_decrypts ['mac' ] == 1 :
527527 try :
528528 if not self .cached_key :
529529 my_pass = keyring .get_password ('Chrome Safe Storage' , 'Chrome' )
@@ -538,7 +538,7 @@ def clean(x):
538538
539539 # If running Chromium on Linux.
540540 # Unlike Win/Mac, we can decrypt Linux cookies without the user's pw
541- if decrypted_value is "<encrypted>" and self .available_decrypts ['linux' ] is 1 :
541+ if decrypted_value == "<encrypted>" and self .available_decrypts ['linux' ] == 1 :
542542 try :
543543 if not self .cached_key :
544544 my_pass = 'peanuts'
@@ -583,7 +583,7 @@ def get_cookies(self, path, database, version):
583583 while compatible_version not in list (query .keys ()) and compatible_version > 0 :
584584 compatible_version -= 1
585585
586- if compatible_version is not 0 :
586+ if compatible_version != 0 :
587587 log .info (" - Using SQL query for Cookie items for Chrome v{}" .format (compatible_version ))
588588 try :
589589 # Copy and connect to copy of 'Cookies' SQLite DB
@@ -664,7 +664,7 @@ def get_login_data(self, path, database, version):
664664 while compatible_version not in list (query .keys ()) and compatible_version > 0 :
665665 compatible_version -= 1
666666
667- if compatible_version is not 0 :
667+ if compatible_version != 0 :
668668 log .info (f' - Using SQL query for Login items for Chrome v{ compatible_version } ' )
669669
670670 # Copy and connect to copy of 'Login Data' SQLite DB
@@ -708,7 +708,7 @@ def get_login_data(self, path, database, version):
708708 username_row .row_type = 'login (username)'
709709 results .append (username_row )
710710
711- if row .get ('password_value' ) is not None and self .available_decrypts ['windows' ] is 1 :
711+ if row .get ('password_value' ) is not None and self .available_decrypts ['windows' ] == 1 :
712712 try :
713713 # Windows is all I've had time to test; Ubuntu uses built-in password manager
714714 password = win32crypt .CryptUnprotectData (
@@ -734,7 +734,7 @@ def get_login_data(self, path, database, version):
734734 while compatible_version not in list (query .keys ()) and compatible_version > 0 :
735735 compatible_version -= 1
736736
737- if compatible_version is not 0 :
737+ if compatible_version != 0 :
738738 log .info (f' - Using SQL query for Login Stat items for Chrome v{ compatible_version } ' )
739739
740740 # Copy and connect to copy of 'Login Data' SQLite DB
@@ -779,7 +779,7 @@ def get_autofill(self, path, database, version):
779779 while compatible_version not in list (query .keys ()) and compatible_version > 0 :
780780 compatible_version -= 1
781781
782- if compatible_version is not 0 :
782+ if compatible_version != 0 :
783783 log .info (" - Using SQL query for Autofill items for Chrome v{}" .format (compatible_version ))
784784 try :
785785 # Copy and connect to copy of 'Web Data' SQLite DB
@@ -1420,7 +1420,7 @@ def expand_language_code(code):
14201420 prefs ['profile' ]['content_settings' ]['exceptions' ]['sound' ].items ():
14211421 if pref_data .get ('last_modified' ):
14221422 interpretation = ''
1423- if pref_data .get ('setting' ) is 2 :
1423+ if pref_data .get ('setting' ) == 2 :
14241424 interpretation = 'Muted site'
14251425 pref_item = Chrome .PreferenceItem (
14261426 self .profile_path , url = origin ,
0 commit comments