From c7dfa16edf2ea023c1ea134c8157d97e992db34e Mon Sep 17 00:00:00 2001 From: Marcus Cobden Date: Wed, 30 Oct 2013 11:50:34 +0000 Subject: [PATCH] Only remove leading '0x' from key ids, not all 0s --- packaging/apt_key | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packaging/apt_key b/packaging/apt_key index 48c3873eb31..764eed6b8ee 100644 --- a/packaging/apt_key +++ b/packaging/apt_key @@ -191,7 +191,8 @@ def main(): if key_id: try: _ = int(key_id, 16) - key_id = key_id.lstrip('0x') + if key_id.startswith('0x'): + key_id = key_id[2:] except ValueError: module.fail_json("Invalid key_id")