diff --git a/icinga-build-upload-aptly b/icinga-build-upload-aptly
index 57c85dcf2e387ca3381abdbe4041bd9507bd5aad..731331fc91e17516ba84b6ea5e8cc9421d88bfcf 100755
--- a/icinga-build-upload-aptly
+++ b/icinga-build-upload-aptly
@@ -32,7 +32,7 @@ def scan_dir(path, pattern):
 
 def detect_rpm(path):
     rpms = scan_dir(path, '*.rpm')
-    if len(rpm) == 0:
+    if len(rpms) == 0:
         return []
         
     return rpms