+ # helper for non_empty() to print correct helptext
+ h = locals()[action + '_parser']
+
+ # Require either hash_str or IDs for
+ def non_empty(h, patch_ids):
+ """Error out if no patch IDs were specified"""
+ if patch_ids == None or len(patch_ids) < 1:
+ sys.stderr.write("Error: Missing Argument! " +
+ "Either [-h HASH] or [ID [ID ...]] are required\n")
+ if h:
+ h.print_help()
+ sys.exit(1)
+ return patch_ids
+