diff --git a/conda/clean-betas.py b/conda/clean-betas.py
index 7e9c0160edcc98bcf187672eaab895c118cd855d..799834dd8710cbb0258a126b391fb4f168c274ac 100755
--- a/conda/clean-betas.py
+++ b/conda/clean-betas.py
@@ -11,7 +11,7 @@ def main(scandir, dry_run):
 
   betas = dict()
 
-  for (path, dirnames, filenames) in os.walk(sys.argv[1], followlinks=False):
+  for (path, dirnames, filenames) in os.walk(scandir, followlinks=False):
 
     for f in filenames:
       if f.startswith('.'): continue