Skip to content

Commit

Permalink
Oops, fix previous commit, and add parameter validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
navv1234 committed Sep 10, 2014
1 parent d123fa0 commit b9b97f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions casc_extract/casc.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ class CDNIndex(CASCObject):

PATCH_BETA = 'wow_beta'
PATCH_PTR = 'wowt'
PATCH_LIVE = 'wow'

def __init__(self, options):
CASCObject.__init__(self, options)
Expand Down
4 changes: 3 additions & 1 deletion casc_extract/casc_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@
(opts, args) = parser.parse_args()
opts.parser = parser

if opts.online and not opts.ptr and not opts.beta:
parser.error("--cdn requires a data source (--ptr, or --beta)")

if not opts.mode and opts.online:
cdn = casc.CDNIndex(opts)
cdn.CheckVersion()
sys.exit(0)
elif opts.mode == 'batch':
if not opts.output:
parser.error("Batch mode requires an output directory for the files")
sys.exit(1)

fname_db = build_cfg.DBFileList(opts)
if not fname_db.open():
Expand Down

0 comments on commit b9b97f3

Please sign in to comment.