offlineimap rev 521
"Automatic Subversion Change Mailer" <[email protected]> Fri, 25 Jul 2003 16:02:13 -0500 (CDT)
| Newsgroups | gmane.mail.imap.offlineimap.subversion |
|---|---|
| Message-ID | <[email protected]> |
You are receiving this message because
all commits get sent to this address.
Author: jgoerzen
Date: 2003-07-25 16:01:25 -0500 (Fri, 25 Jul 2003)
New Revision: 521
Modified:
offlineimap/head/offlineimap/__init__.py
offlineimap/head/offlineimap/init.py
offlineimap/head/offlineimap/localeval.py
Log:
A few fixes for Jython compatibility.
Diff:
Modified: offlineimap/head/offlineimap/__init__.py
==============================================================================
--- offlineimap/head/offlineimap/__init__.py 2003-07-25 20:47:18 UTC (rev 520)
+++ offlineimap/head/offlineimap/__init__.py 2003-07-25 21:01:25 UTC (rev 521)
@@ -1,3 +1,3 @@
-__all__ = ['ui', 'folder', 'repository', 'mbnames', 'threadutil']
+__all__ = ['ui', 'folder', 'repository', 'mbnames', 'threadutil', 'init']
Modified: offlineimap/head/offlineimap/init.py
==============================================================================
--- offlineimap/head/offlineimap/init.py 2003-07-25 20:47:18 UTC (rev 520)
+++ offlineimap/head/offlineimap/init.py 2003-07-25 21:01:25 UTC (rev 521)
@@ -55,15 +55,15 @@
for optlist in getopt(sys.argv[1:], 'P:1oa:c:d:l:u:h')[0]:
options[optlist[0]] = optlist[1]
- if '-h' in options:
+ if options.has_key('-h'):
sys.stdout.write(version.cmdhelp)
sys.stdout.write("\n")
sys.exit(0)
configfilename = os.path.expanduser("~/.offlineimaprc")
- if '-c' in options:
+ if options.has_key('-c'):
configfilename = options['-c']
- if '-P' in options:
- if not '-1' in options:
+ if options.has_key('-P'):
+ if not options.has_key('-1'):
sys.stderr.write("FATAL: profile mode REQUIRES -1\n")
sys.exit(100)
profiledir = options['-P']
@@ -81,12 +81,12 @@
ui = offlineimap.ui.detector.findUI(config, options.get('-u'))
UIBase.setglobalui(ui)
- if '-l' in options:
+ if options.has_key('-l'):
ui.setlogfd(open(options['-l'], 'wt'))
ui.init_banner()
- if '-d' in options:
+ if options.has_key('-d'):
for debugtype in options['-d'].split(','):
ui.add_debug(debugtype.strip())
if debugtype == 'imap':
@@ -94,18 +94,18 @@
if debugtype == 'thread':
threading._VERBOSE = 1
- if '-o' in options:
+ if options.has_key('-o'):
# FIXME: maybe need a better
for section in accounts.getaccountlist(config):
config.remove_option('Account ' + section, "autorefresh")
lock(config, ui)
- if '-l' in options:
+ if options.has_key('-l'):
sys.stderr = ui.logfile
activeaccounts = config.get("general", "accounts")
- if '-a' in options:
+ if options.has_key('-a'):
activeaccounts = options['-a']
activeaccounts = activeaccounts.replace(" ", "")
activeaccounts = activeaccounts.split(",")
@@ -119,7 +119,7 @@
remoterepos = None
localrepos = None
- if '-1' in options:
+ if options.has_key('-1'):
threadutil.initInstanceLimit("ACCOUNTLIMIT", 1)
else:
threadutil.initInstanceLimit("ACCOUNTLIMIT",
@@ -128,7 +128,7 @@
for reposname in config.getsectionlist('Repository'):
for instancename in ["FOLDER_" + reposname,
"MSGCOPY_" + reposname]:
- if '-1' in options:
+ if options.has_key('-1'):
threadutil.initInstanceLimit(instancename, 1)
else:
threadutil.initInstanceLimit(instancename,
Modified: offlineimap/head/offlineimap/localeval.py
==============================================================================
--- offlineimap/head/offlineimap/localeval.py 2003-07-25 20:47:18 UTC (rev 520)
+++ offlineimap/head/offlineimap/localeval.py 2003-07-25 21:01:25 UTC (rev 521)
@@ -17,7 +17,11 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-import imp, errno
+import imp
+try:
+ import errno
+except:
+ pass
class LocalEval:
def __init__(self, path=None):