157 # BEGIN ADD USER'S PROJ
158 try:
159 conn = sqlite3.connect(self.app.config.user_proj_map_db)
160 c = conn.cursor()
161 c.execute('SELECT PROJ FROM USER_PROJ WHERE GID=?', [job_wrapper.user_id])
162 row = c.fetchone()
163 c.close
164 native_spec += ' -P ' + row[0]
165 except:
166 log.debug("Cannot look up proj of user %s" % job_wrapper.user_id)
167 # /END ADD USER PROJ
also, in the config, define a default instead of using None:
self.user_proj_map_db = resolve_path( kwargs.get( "user_proj_map_db", "database/user_proj_map.sqlite" ), self.root )