Default repository for execsql.py
Révision | bb75cc408b9a967d6cff8680a9e8fdfb03fb6884 (tree) |
---|---|
l'heure | 2019-10-28 02:02:27 |
Auteur | Dreas Nielsen <dnielsen@inte...> |
Commiter | Dreas Nielsen |
Applied changes from revs 519 and 525.
@@ -5481,6 +5481,7 @@ | ||
5481 | 5481 | src_msg = ", ".join(["%s line %s" % src for src in sources]) |
5482 | 5482 | write_warning("IF level mismatch at beginning and end of script; origin at or after: %s." % src_msg) |
5483 | 5483 | def run_and_increment(self): |
5484 | + global last_command | |
5484 | 5485 | cmditem = self.cmdlist[self.cmdptr] |
5485 | 5486 | last_command = cmditem |
5486 | 5487 | if cmditem.command_type == "sql" and status.batch.in_batch(): |
@@ -5643,8 +5644,8 @@ | ||
5643 | 5644 | if self.script_id not in savedscripts.keys(): |
5644 | 5645 | raise ErrInfo("cmd", other_msg="There is no SCRIPT named %s." % self.script_id) |
5645 | 5646 | self.arg_exp = kwargs["argexp"] |
5646 | - self.looptype = kwargs["looptype"].upper() if kwargs["looptype"] is not None else None | |
5647 | - self.loopcond = kwargs["loopcond"] | |
5647 | + self.looptype = kwargs["looptype"].upper() if "looptype" in kwargs and kwargs["looptype"] is not None else None | |
5648 | + self.loopcond = kwargs["loopcond"] if "loopcond" in kwargs else None | |
5648 | 5649 | def execute(self): |
5649 | 5650 | # Copy the saved script because otherwise the memory-recovery nullification |
5650 | 5651 | # of completed commands will erase the saved script commands. |