diff options
author | Diogo Laginha <dmachado@ipn.pt> | 2011-12-21 17:35:02 +0000 |
---|---|---|
committer | Diogo Laginha <dmachado@ipn.pt> | 2011-12-21 17:35:02 +0000 |
commit | 1829998ff447675a3b2cdcd258c4540ff0e1b6ec (patch) | |
tree | bc442beb6b34a7337b343a22ea422b84c62e70d1 | |
parent | 7c54012914d95ac759b9c3c67aea154657d8a118 (diff) | |
download | pycco-1829998ff447675a3b2cdcd258c4540ff0e1b6ec.tar.gz |
debug: run pycco without any arguments
-rw-r--r-- | pycco/main.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/pycco/main.py b/pycco/main.py index c438ea6..79c4221 100644 --- a/pycco/main.py +++ b/pycco/main.py @@ -488,18 +488,19 @@ def main(): opts, sources = parser.parse_args() + if not sources: + return + filepath = os.path.dirname( sources[0] ) start, filetype = os.path.splitext( sources[0] ) - - print start + if start.endswith( '*' ): - raise NoFilesFound() - else: - start = os.path.dirname( os.path.dirname( start ) ) + return + + start = os.path.dirname( os.path.dirname( start ) ) if opts.all: sources = [ i for i in get_all_files( filepath, filetype ) ] - global SOURCES SOURCES = Sources( sources, start ) |