Mercurial > hg > MakeItSo
comparison makeitso/makeitso.py @ 213:fa496c9e9d73
move away from assert to AssertionError
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Thu, 03 Dec 2015 12:54:17 -0800 |
parents | 0fd0cc154153 |
children | 407dd46857e1 |
comparison
equal
deleted
inserted
replaced
212:cffc729926b9 | 213:fa496c9e9d73 |
---|---|
244 | 244 |
245 def check_output(self, output): | 245 def check_output(self, output): |
246 """ | 246 """ |
247 checks output for validity | 247 checks output for validity |
248 """ | 248 """ |
249 assert output # must provide output | 249 if not output: |
250 raise AssertionError("Must provide output") | |
250 if os.path.exists(output): | 251 if os.path.exists(output): |
251 assert os.path.isdir(output), "%s: Must be a directory" % self.name | 252 assert os.path.isdir(output), "%s: Must be a directory" % self.name |
252 | 253 |
253 def missing(self, **variables): | 254 def missing(self, **variables): |
254 vars = self.defaults.copy() | 255 vars = self.defaults.copy() |