Commit e176aa96 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

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 @@ ...@@ -31,6 +31,8 @@
# interpreted as representing official policies, either expressed # interpreted as representing official policies, either expressed
# or implied, of GRNET S.A. # or implied, of GRNET S.A.
import copy
def dict_merge(a, b): def dict_merge(a, b):
""" """
......
...@@ -36,6 +36,7 @@ import distribute_setup ...@@ -36,6 +36,7 @@ import distribute_setup
distribute_setup.use_setuptools() distribute_setup.use_setuptools()
import os import os
import sys
from setuptools import setup, find_packages from setuptools import setup, find_packages
from fnmatch import fnmatchcase from fnmatch import fnmatchcase
......
...@@ -36,6 +36,7 @@ import distribute_setup ...@@ -36,6 +36,7 @@ import distribute_setup
distribute_setup.use_setuptools() distribute_setup.use_setuptools()
import os import os
import sys
from distutils.util import convert_path from distutils.util import convert_path
from fnmatch import fnmatchcase from fnmatch import fnmatchcase
......
...@@ -377,6 +377,7 @@ def render_metadata(request, metadata, use_values=False, status=200): ...@@ -377,6 +377,7 @@ def render_metadata(request, metadata, use_values=False, status=200):
def render_meta(request, meta, status=200): def render_meta(request, meta, status=200):
if request.serialization == 'xml': if request.serialization == 'xml':
key, val = meta.items()[0]
data = render_to_string('meta.xml', dict(key=key, val=val)) data = render_to_string('meta.xml', dict(key=key, val=val))
else: else:
data = json.dumps(dict(meta=meta)) data = json.dumps(dict(meta=meta))
......
...@@ -63,6 +63,7 @@ class Command(BaseCommand): ...@@ -63,6 +63,7 @@ class Command(BaseCommand):
base = options['base'] base = options['base']
add_reserved = options['add-reserved'] add_reserved = options['add-reserved']
remove_reserved = options['remove-reserved'] remove_reserved = options['remove-reserved']
size = options['size']
if not type_: if not type_:
raise CommandError("Type of pool is mandatory") raise CommandError("Type of pool is mandatory")
......
...@@ -36,6 +36,7 @@ import distribute_setup ...@@ -36,6 +36,7 @@ import distribute_setup
distribute_setup.use_setuptools() distribute_setup.use_setuptools()
import os import os
import sys
from distutils.util import convert_path from distutils.util import convert_path
from fnmatch import fnmatchcase from fnmatch import fnmatchcase
......
...@@ -75,7 +75,6 @@ class Public(DBWorker): ...@@ -75,7 +75,6 @@ class Public(DBWorker):
) )
q = "insert into public(path, active, url) values(?, 1, ?)" q = "insert into public(path, active, url) values(?, 1, ?)"
self.execute(q, (path, url)) 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): def public_unset(self, path):
......
...@@ -36,6 +36,7 @@ import distribute_setup ...@@ -36,6 +36,7 @@ import distribute_setup
distribute_setup.use_setuptools() distribute_setup.use_setuptools()
import os import os
import sys
from distutils.util import convert_path from distutils.util import convert_path
from fnmatch import fnmatchcase 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