1. Nozomu Kaneko
  2. pymotw-ja

Commits

Doug Hellmann  committed 46e514d

fix cog() when invoked as dependency of another task where cli args aren't passed

  • Participants
  • Parent commits 8c13b0f
  • Branches default
  • Tags 1.100

Comments (0)

Files changed (1)

File pavement.py

View file
  • Ignore whitespace
     # Figure out if we were given a filename or
     # directory, and scan the directory for files
     # if we need to.
-    files_to_cog = options.args
+    files_to_cog = getattr(options, 'args', [])
     if files_to_cog and os.path.isdir(files_to_cog[0]):
         dir_to_scan = path(files_to_cog[0])
         files_to_cog = dir_to_scan.walkfiles(options.get("pattern", "*.rst"))