Commit e176aa96 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis

Resolve some undefined names

Add missing imports; remove call to sqlite3_changes; set key and val
in render_meta.
parent 5adb33d2
......@@ -31,6 +31,8 @@
# interpreted as representing official policies, either expressed
# or implied, of GRNET S.A.
import copy
def dict_merge(a, b):
"""
......
......@@ -36,6 +36,7 @@ import distribute_setup
distribute_setup.use_setuptools()
import os
import sys
from setuptools import setup, find_packages
from fnmatch import fnmatchcase
......
......@@ -36,6 +36,7 @@ import distribute_setup
distribute_setup.use_setuptools()
import os
import sys
from distutils.util import convert_path
from fnmatch import fnmatchcase
......
......@@ -377,6 +377,7 @@ def render_metadata(request, metadata, use_values=False, status=200):
def render_meta(request, meta, status=200):
if request.serialization == 'xml':
key, val = meta.items()[0]
data = render_to_string('meta.xml', dict(key=key, val=val))
else:
data = json.dumps(dict(meta=meta))
......
......@@ -63,6 +63,7 @@ class Command(BaseCommand):
base = options['base']
add_reserved = options['add-reserved']
remove_reserved = options['remove-reserved']
size = options['size']
if not type_:
raise CommandError("Type of pool is mandatory")
......
......@@ -36,6 +36,7 @@ import distribute_setup
distribute_setup.use_setuptools()
import os
import sys
from distutils.util import convert_path
from fnmatch import fnmatchcase
......
......@@ -75,8 +75,7 @@ class Public(DBWorker):
)
q = "insert into public(path, active, url) values(?, 1, ?)"
self.execute(q, (path, url))
if sqlite3_changes() != 0:
logger.info('Public url set for path: %s' % path)
logger.info('Public url set for path: %s' % path)
def public_unset(self, path):
q = "delete from public where path = ?"
......
......@@ -36,6 +36,7 @@ import distribute_setup
distribute_setup.use_setuptools()
import os
import sys
from distutils.util import convert_path
from fnmatch import fnmatchcase
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment