Fix Python 3 syntax warning (is vs ==)
authorTomáš Virtus <nechtom@gmail.com>
Mon, 3 Feb 2020 11:01:42 +0000 (12:01 +0100)
committerTomáš Virtus <nechtom@gmail.com>
Mon, 3 Feb 2020 11:43:25 +0000 (12:43 +0100)
Fixes the following warning:

  ./grml2usb:1691: SyntaxWarning: "is" with a literal. Did you mean "=="?
    if mbrcode is "":

grml2usb

index 7434901..db067d4 100755 (executable)
--- a/grml2usb
+++ b/grml2usb
@@ -1688,7 +1688,7 @@ def handle_mbr(device):
                 mbrcode = mbrpath
                 break
 
-        if mbrcode is "":
+        if not mbrcode:
             str_locations = " or ".join(['"%s"' % l for l in mbr_locations])
             logging.error('Cannot find syslinux MBR, install it at %s)',
                           str_locations)