tests: restore logger module after tampering it
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 10 Feb 2015 15:14:18 +0000 (17:14 +0200)
committerGuido Günther <agx@sigxcpu.org>
Wed, 18 Feb 2015 07:55:02 +0000 (08:55 +0100)
So that subsequent log capture (by GbpLogTester) is not affected.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp/scripts/import_orig.py

index f73dea1726621a735ba8e3cc887e2f72f6fb48e5..1e0e85b205539d86e7f526bc25dfb0f500c1b9c9 100644 (file)
@@ -253,11 +253,13 @@ def parse_args(argv):
     @return: options and arguments
 
     # Silence error output
+    >>> _gbp_log_error_bak = gbp.log.error
     >>> gbp.log.error = lambda x: None
     >>> parse_args(['arg0', '--download', '--uscan'])
     (None, None)
     >>> parse_args(['arg0', '--download', 'first', 'second'])
     (None, None)
+    >>> gbp.log.error = _gbp_log_error_bak
     """
 
     parser = build_parser(argv[0])