changeset 1163:eb0700881a98

Fixed asserts/type checks.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Wed, 09 Aug 2006 17:23:51 +0200
parents 3e2b4beb65ed
children 32c936ab469e
files MoinMoin/wikisync.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/wikisync.py	Wed Aug 09 17:22:47 2006 +0200
+++ b/MoinMoin/wikisync.py	Wed Aug 09 17:23:51 2006 +0200
@@ -27,6 +27,7 @@
         @param remote_rev: The revision number on the remote end.
         @param current_rev: The related local revision.
         """
+        assert isinstance(remote_wiki, str) and isinstance(remote_rev, int) and isinstance(current_rev, int)
         self.remote_wiki = remote_wiki
         self.remote_rev = remote_rev
         self.current_rev = current_rev
@@ -122,7 +123,7 @@
         self.commit()
 
     def fetch(self, iwid_full=None, iw_name=None):
-        assert iwid_full ^ iw_name
+        assert bool(iwid_full) ^ bool(iw_name)
         if iwid_full:
             iwid_full = unpackLine(iwid_full)
             if len(iwid_full) == 1: