]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Pylint: examples: fix redefined variables from outer scope
authorMartin <martin.basti@gmail.com>
Sat, 2 Jul 2016 20:22:56 +0000 (22:22 +0200)
committerMartin <martin.basti@gmail.com>
Sat, 2 Jul 2016 20:22:56 +0000 (22:22 +0200)
examples/zonediff.py

index f388c170a7c42714a26c34921c3d82dc658d4cd6..deafa0733ce79683277032fb23b5dbff5d8b20b1 100755 (executable)
@@ -142,8 +142,9 @@ def format_changes_html(oldf, newf, changes, ignore_ttl=False):
         ret += '    </tr>\n'
     return ret + '  </tbody>\n</table>'
 
+
 # Make this module usable as a script too.
-if __name__ == '__main__':
+def main():
     import optparse
     import subprocess
     import sys
@@ -269,3 +270,6 @@ The differences shown will be logical differences, not textual differences.
     else:
         print(format_changes_plain(oldn, newn, changes, opts.ignore_ttl))
     sys.exit(1)
+
+if __name__ == '__main__':
+    main()