The only thing in helpers.py that needed vars.py was the log stuff.

So put it in its own file.  Now it's safer to import and use helpers even if
you can't safely touch vars.
This commit is contained in:
Avery Pennarun 2010-12-11 18:32:40 -08:00
commit e18fa85d58
12 changed files with 72 additions and 69 deletions

View file

@ -1,7 +1,7 @@
import sys, os, errno, glob, stat, fcntl, sqlite3
import vars
from helpers import unlink, err, debug2, debug3, close_on_exec
import helpers
from helpers import unlink, close_on_exec
from log import err, debug2, debug3
SCHEMA_VER=1
TIMEOUT=60
@ -97,7 +97,6 @@ def _write(q, l):
return
global _wrote
_wrote += 1
#helpers.log_('W: %r %r\n' % (q,l))
db().execute(q, l)
@ -106,7 +105,6 @@ def commit():
return
global _wrote
if _wrote:
#helpers.log_("COMMIT (%d)\n" % _wrote)
db().commit()
_wrote = 0