equal
deleted
inserted
replaced
678 for s in scope: |
678 for s in scope: |
679 try: |
679 try: |
680 # pytype: disable=module-attr |
680 # pytype: disable=module-attr |
681 with winreg.OpenKey(s, encoding.strfromlocal(key)) as hkey: |
681 with winreg.OpenKey(s, encoding.strfromlocal(key)) as hkey: |
682 # pytype: enable=module-attr |
682 # pytype: enable=module-attr |
683 name = valname and encoding.strfromlocal(valname) or valname |
683 name = None |
|
684 if valname is not None: |
|
685 name = encoding.strfromlocal(valname) |
684 # pytype: disable=module-attr |
686 # pytype: disable=module-attr |
685 val = winreg.QueryValueEx(hkey, name)[0] |
687 val = winreg.QueryValueEx(hkey, name)[0] |
686 # pytype: enable=module-attr |
688 # pytype: enable=module-attr |
687 |
689 |
688 # never let a Unicode string escape into the wild |
690 # never let a Unicode string escape into the wild |