[CalendarServer-changes] [12714] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 12 11:21:07 PDT 2014
Revision: 12714
http://trac.calendarserver.org//changeset/12714
Author: cdaboo at apple.com
Date: 2014-02-17 10:15:54 -0800 (Mon, 17 Feb 2014)
Log Message:
-----------
Fix format string spec - need" :d" not "!d".
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/directory/ldapdirectory.py
CalendarServer/trunk/txdav/common/datastore/sql.py
Modified: CalendarServer/trunk/twistedcaldav/directory/ldapdirectory.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/ldapdirectory.py 2014-02-15 01:11:35 UTC (rev 12713)
+++ CalendarServer/trunk/twistedcaldav/directory/ldapdirectory.py 2014-02-17 18:15:54 UTC (rev 12714)
@@ -566,7 +566,7 @@
else:
self.log.error(
- "Giving up on LDAP authentication after {count!d} tries. "
+ "Giving up on LDAP authentication after {count:d} tries. "
"Responding with 503.", count=TRIES
)
raise HTTPError(StatusResponse(
@@ -609,16 +609,16 @@
return []
except ldap.SIZELIMIT_EXCEEDED, e:
self.log.debug(
- "LDAP result limit exceeded: {limit!d}", limit=resultLimit
+ "LDAP result limit exceeded: {limit:d}", limit=resultLimit
)
except ldap.TIMELIMIT_EXCEEDED, e:
self.log.warn(
- "LDAP timeout exceeded: {t!d} seconds", t=timeoutSeconds
+ "LDAP timeout exceeded: {t:d} seconds", t=timeoutSeconds
)
except ldap.SERVER_DOWN:
self.ldap = None
self.log.error(
- "LDAP server unavailable (tried {count!d} times)",
+ "LDAP server unavailable (tried {count:d} times)",
count=(i + 1)
)
continue
@@ -634,7 +634,7 @@
filterstr = "%s..." % (filterstr[:100],)
self.log.error(
"LDAP query exceeded threshold: {time!.2f} seconds for "
- "{base} {filter} {attrs} (#results={count!d})",
+ "{base} {filter} {attrs} (#results={count:d})",
time=totalTime, base=base, filter=filterstr,
attrs=attrlist, count=len(result),
)
@@ -1314,7 +1314,7 @@
if filterstr is not None:
# Query the LDAP server
self.log.debug(
- "LDAP search {base} {filter} (limit={limit!d})",
+ "LDAP search {base} {filter} (limit={limit:d})",
base=ldap.dn.dn2str(base), filter=filterstr,
limit=limitResults,
)
@@ -1360,8 +1360,8 @@
numMissingRecordNames += 1
self.log.debug(
- "LDAP search returned {resultCount!d} results, "
- "{typeCount!d} usable",
+ "LDAP search returned {resultCount:d} results, "
+ "{typeCount:d} usable",
resultCount=len(results), typeCount=typeCounts[recordType]
)
@@ -1370,7 +1370,7 @@
)
totalTime = time.time() - startTime
self.log.info(
- "Calendar user search for {tokens} matched {recordCount!d} "
+ "Calendar user search for {tokens} matched {recordCount:d} "
"records ({typeCount}) in {time!.2f} seconds",
tokens=tokens, recordCount=len(records),
typeCount=typeCountsStr, time=totalTime,
@@ -1475,13 +1475,13 @@
if numMissingGuids:
self.log.warn(
- "{count!d} {type} records are missing {attr}",
+ "{count:d} {type} records are missing {attr}",
count=numMissingGuids, type=recordType, attr=guidAttr
)
if numMissingRecordNames:
self.log.warn(
- "{count!d} {type} records are missing record name",
+ "{count:d} {type} records are missing record name",
count=numMissingRecordNames, type=recordType,
)
Modified: CalendarServer/trunk/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql.py 2014-02-15 01:11:35 UTC (rev 12713)
+++ CalendarServer/trunk/txdav/common/datastore/sql.py 2014-02-17 18:15:54 UTC (rev 12714)
@@ -446,8 +446,8 @@
if self.txn is not None:
log.error(
"Transaction wait: {me.txn}, "
- "Statements: {me.txn.statementCount!d}, "
- "IUDs: {me.txn.iudCount!d}, "
+ "Statements: {me.txn.statementCount:d}, "
+ "IUDs: {me.txn.iudCount:d}, "
"Statement: {me.txn.currentStatement}",
me=self
)
@@ -466,8 +466,8 @@
if self.txn is not None:
log.error(
"Transaction abort too long: {me.txn}, "
- "Statements: {me.txn.statementCount!d}, "
- "IUDs: {me.txn.iudCount!d}, "
+ "Statements: {me.txn.statementCount:d}, "
+ "IUDs: {me.txn.iudCount:d}, "
"Statement: {me.txn.currentStatement}",
me=self
)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/24404883/attachment.html>
More information about the calendarserver-changes
mailing list