From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9CF1C138A2F for ; Tue, 19 Aug 2014 03:06:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6EC5BE0A10; Tue, 19 Aug 2014 03:06:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E6C3EE09DA for ; Tue, 19 Aug 2014 03:06:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 536C034001A for ; Tue, 19 Aug 2014 03:06:51 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6D5733BA1 for ; Tue, 19 Aug 2014 01:49:06 +0000 (UTC) From: "Devan Franchini" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Devan Franchini" Message-ID: <1408308918.da7cf19e4f546505f22ace5f96d739720d9607b6.twitch153@gentoo> Subject: [gentoo-commits] proj/layman:master commit in: layman/ X-VCS-Repository: proj/layman X-VCS-Files: layman/updater.py X-VCS-Directories: layman/ X-VCS-Committer: twitch153 X-VCS-Committer-Name: Devan Franchini X-VCS-Revision: da7cf19e4f546505f22ace5f96d739720d9607b6 X-VCS-Branch: master Date: Tue, 19 Aug 2014 01:49:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 8f0fd32a-6a48-47cc-9aa7-bf94821e9302 X-Archives-Hash: 0142d1326580a3e41ef090f329db594f Message-ID: <20140819014906.vgz-1zUQjIKJYBLjlyW5LUEPwpaqNB9xyNLI0wQeLaE@z> commit: da7cf19e4f546505f22ace5f96d739720d9607b6 Author: Devan Franchini gentoo org> AuthorDate: Sun Aug 17 20:55:18 2014 +0000 Commit: Devan Franchini gentoo org> CommitDate: Sun Aug 17 20:55:18 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=da7cf19e updater.py: Adds list conversion for str conf_type --- layman/updater.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/layman/updater.py b/layman/updater.py index e0ffbd8..e6d3596 100644 --- a/layman/updater.py +++ b/layman/updater.py @@ -5,6 +5,7 @@ from __future__ import unicode_literals from sys import stderr import os +import sys import argparse from layman.config import OptionConfig @@ -12,6 +13,10 @@ from layman.api import LaymanAPI from layman.version import VERSION from layman.compatibility import fileopen +if sys.hexversion >= 0x30200f0: + STR = str +else: + STR = basestring def rename_db(config, newname, output): """small upgrade function to handle the name change @@ -86,6 +91,9 @@ class Main(object): def check_is_new(self): print_instructions = False + if isinstance(self.config['conf_type'], STR): + self.config.set_option('conf_type', + self.config['conf_type'].split(', ')) for i in self.config['conf_type']: conf = i.replace('.', '_') if not os.access(self.config[conf], os.F_OK):