summaryrefslogtreecommitdiffstats
path: root/mail/offlineimap/files/patch-use-interpolation
blob: a6004f25e3391c9e8a8dfce49cc9a156aa094c08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
From 8cf576b9edd7f7fe245d4590206ff740d3ed31e3 Mon Sep 17 00:00:00 2001
From: Eygene Ryabinkin <rea@codelabs.ru>
Date: Wed, 6 Jun 2012 07:45:01 +0400
Subject: [PATCH] Use '%' instead of String.format()

Python 2.6 doesn't like empty {} specifications for
String.format(), but the ones that were changed don't
really need the full machinery of String.format() here.

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
---
 offlineimap/folder/Base.py |    2 +-
 offlineimap/ui/UIBase.py   |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/offlineimap/folder/Base.py b/offlineimap/folder/Base.py
index 6f6f364..4c3f1ca 100644
--- a/offlineimap/folder/Base.py
+++ b/offlineimap/folder/Base.py
@@ -386,7 +386,7 @@ class BaseFolder(object):
                             self.getmessageuidlist())
         num_to_copy = len(copylist)
         if num_to_copy and self.repository.account.dryrun:
-            self.ui.info("[DRYRUN] Copy {} messages from {}[{}] to {}".format(
+            self.ui.info("[DRYRUN] Copy %d messages from %s[%s] to %s" % (
                     num_to_copy, self, self.repository, dstfolder.repository))
             return
         for num, uid in enumerate(copylist):
diff --git a/offlineimap/ui/UIBase.py b/offlineimap/ui/UIBase.py
index eea929d..6608d6d 100644
--- a/offlineimap/ui/UIBase.py
+++ b/offlineimap/ui/UIBase.py
@@ -301,7 +301,7 @@ class UIBase(object):
     def makefolder(self, repo, foldername):
         """Called when a folder is created"""
         prefix = "[DRYRUN] " if self.dryrun else ""
-        self.info("{}Creating folder {}[{}]".format(
+        self.info("%sCreating folder %s[%s]" % (
                 prefix, foldername, repo))
 
     def syncingfolder(self, srcrepos, srcfolder, destrepos, destfolder):
@@ -346,7 +346,7 @@ class UIBase(object):
     def deletingmessages(self, uidlist, destlist):
         ds = self.folderlist(destlist)
         prefix = "[DRYRUN] " if self.dryrun else ""
-        self.info("{}Deleting {} messages ({}) in {}".format(
+        self.info("%sDeleting %s messages (%s) in %s" % (
                 prefix, len(uidlist),
                 offlineimap.imaputil.uid_sequence(uidlist), ds))
 
@@ -474,7 +474,7 @@ class UIBase(object):
 
     def callhook(self, msg):
         if self.dryrun:
-            self.info("[DRYRUN] {}".format(msg))
+            self.info("[DRYRUN] %s" % (msg))
         else:
             self.info(msg)
 
-- 
1.7.10.3

OpenPOWER on IntegriCloud