summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-07-29 14:20:54 +0300
committerAlon Levy <alevy@redhat.com>2011-07-29 14:20:54 +0300
commitecefd0d9c572f5cacda2d208f5a61d036229dcd1 (patch)
tree0fcd61416fb095f73bf261ab6c5ee9db9dda9ace
parente89b797d484f3d8c8d7ac315b19a01dead87c982 (diff)
copy_qxl_to_image: add --allow-old
-rwxr-xr-xcopy_qxl_to_image10
1 files changed, 6 insertions, 4 deletions
diff --git a/copy_qxl_to_image b/copy_qxl_to_image
index 31078af..8713cf6 100755
--- a/copy_qxl_to_image
+++ b/copy_qxl_to_image
@@ -11,6 +11,7 @@ parser.add_argument('--root', dest='root', default=None)
parser.add_argument('--partition', dest='partition', default=None)
parser.add_argument('--system32', dest='system32', choices=['Windows/System32', 'WINDOWS/system32'])
parser.add_argument('--erase_old_driver_files', dest='erase', default=False, action='store_true')
+parser.add_argument('--allow-old', action='store_true', default=False)
args, rest = parser.parse_known_args(sys.argv[1:])
def no_flags_usage(rest):
@@ -47,13 +48,14 @@ if len(image_user) != 0:
print "will not update used image"
sys.exit(1)
-def not_too_old(p):
+def not_too_old(p, do_exit):
if os.system("peversion %s" % p):
print "%s is too old" % p
- sys.exit(1)
+ if do_exit:
+ sys.exit(1)
-not_too_old(qxldd_path)
-not_too_old(qxlsys_path)
+not_too_old(qxldd_path, not args.allow_old)
+not_too_old(qxlsys_path, not args.allow_old)
data = dict(system32=args.system32, partition=args.partition,
image=args.image,base=base, qxldd_path=qxldd_path, qxlsys_path=qxlsys_path,