[PATCH 1 of 3 skos] Get "repo" from the Connection object directly

Denis Laxalde denis.laxalde at logilab.fr
Mon Jan 8 12:34:36 CET 2018


# HG changeset patch
# User Denis Laxalde <denis.laxalde at logilab.fr>
# Date 1515410972 -3600
#      Mon Jan 08 12:29:32 2018 +0100
# Node ID 056d3154cbe05727e585d7c3c1458c6dcb181872
# Parent  1c0ace9c7328e9e7386f4560ba9c74cb24d754ef
Get "repo" from the Connection object directly

It's clearer this way as it does not give the impression that we need to
use the object return by Connection.__enter__().

diff --git a/ccplugin.py b/ccplugin.py
--- a/ccplugin.py
+++ b/ccplugin.py
@@ -154,7 +154,7 @@ class ImportSkosData(Command):
                 print(u'Created: %d\nUpdated: %d' % (len(created), len(updated)))
                 if conceptschemes:
                     print(u'Concept schemes:\n* %s' % '\n* '.join(conceptschemes))
-        cnx.repo.shutdown()
+        connection.repo.shutdown()
 
 
 CWCTL.register(ImportSkosData)



More information about the saem-devel mailing list