# Parse arguments
args = parser.parse_args(argv[1:])
+ #In python3.x version, if global opiton '-d' , '-v', '-i' is used, it will be not passed to mic create command.
+ #beside, there is same arguments in mic create command.
+ for debug_option in ('-d', '--debug'):
+ if debug_option in argv[1:]:
+ args.debug = True
+
+ for verbose_option in ('-v', '--verbose'):
+ if verbose_option in argv[1:]:
+ args.verbose = True
+ #for python3.x, args.interactive will always be True even using --non-interactive, that's because it is rewirte by option '-i'
+ #for '-i', use it, action is True, without it, default value is True.
+ if '--non-interactive' in argv[1:]:
+ args.interactive = False
+
if args.interactive:
msger.enable_interactive()
if args.debug:
try:
import rpm
- rpm.setVerbosity(rpm.RPMLOG_DEBUG)
+ rpm.setVerbosity(rpm.RPMLOG_NOTICE)
except ImportError:
pass