From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 9742C6DE0F58 for ; Sat, 20 Apr 2019 05:41:13 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.299 X-Spam-Level: X-Spam-Status: No, score=0.299 tagged_above=-999 required=5 tests=[AWL=-0.355, DKIMWL_WL_MED=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_NEUTRAL=0.652, UNPARSEABLE_RELAY=0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PpIbMdjCJlU3 for ; Sat, 20 Apr 2019 05:41:12 -0700 (PDT) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by arlo.cworth.org (Postfix) with ESMTPS id E5B2C6DE0F31 for ; Sat, 20 Apr 2019 05:41:11 -0700 (PDT) Received: by mail-wr1-f65.google.com with SMTP id g3so10009742wrx.9 for ; Sat, 20 Apr 2019 05:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dme-org.20150623.gappssmtp.com; s=20150623; h=to:cc:subject:in-reply-to:references:from:date:message-id :mime-version; bh=7wKV/T6X4bcSc/woLUHornDHlxOW8IdSlYDVu3gJ8Vo=; b=cgg4bEhIjY2bS7aiRZkQD4DugRwUUFrXuPD/Gn9Iid7fQyQVACZu19lfID3tAzMREv 6wzD2mo7LrYPluOS+DOsV/FW9RMisfVP4ra5NweP1+oI+MQr6939UqvN7ORfdeyqNOyX l8Ak3zanQnEGtb3/GAhwe9dIqTLeP07pskzimiNqmrCIyhIlLWXXrlQIvXv33na/325k jmqHBtuAgK2dp+Mcikg23LIPRdUYBTK+8zKFC8C9+7hDdVsH+xxCBr6luBfQDltDxxIT E6hXg3PDTLkABwEs5gb6cgRxIH7K/Gx+QQXkLdI6rEnsWsvp0n0918WIyNoa5JjjLOjz K95A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:subject:in-reply-to:references:from:date :message-id:mime-version; bh=7wKV/T6X4bcSc/woLUHornDHlxOW8IdSlYDVu3gJ8Vo=; b=SzEURK+n8tXS6pKmvdZjGgorAxgu/p2cRuMETxRBI7kfUbTluB8CfcS9pDtqydsxKL nPiUOSMiqsJrBxUZXcsLzJGTWXIvl1cy5G1AGaqEMhqTdFGCF8ZHZ2f5TMS3ogGFsZDO beNS3DX6bYYEDn0jRaeRWPgpmfKoUD5U44J2gpE6d33bUJsiP8xEQusGwXXmnBdd9A5J WmAgzUINcLeUgbTUL246MbHDJo27wa/WMpbGH45MGM5AsmakY8m17ibc3d0+6h3Vvp34 BS+gX/Vya7pIxojAp7KT03CSqOnagjjPr0e3NRFpA/VTip7uGnsxR9plfRXZvVgOLwve Cc6Q== X-Gm-Message-State: APjAAAWaBb+WpooUgTIHQl8fN547jcIo4thPfWGyvnTHJgKsxmYZrzxY EXaxWgFfQPMIc3jAVIGNrStQAb/7QcM= X-Google-Smtp-Source: APXvYqzi0l1N5MmU0XY+HgoxDJvxSDhBRBlEw+tqaFej7hHePh5w8lytfq4L8PzmCbhkK4mVQ6GgRA== X-Received: by 2002:adf:edc6:: with SMTP id v6mr6670938wro.189.1555764067562; Sat, 20 Apr 2019 05:41:07 -0700 (PDT) Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net. [81.149.164.25]) by smtp.gmail.com with ESMTPSA id q3sm8555417wrr.75.2019.04.20.05.41.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Apr 2019 05:41:06 -0700 (PDT) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 92ae51b3; Sat, 20 Apr 2019 12:41:05 +0000 (UTC) To: Doan Tran Cong Danh , notmuch@notmuchmail.org Cc: Doan Tran Cong Danh Subject: Re: [PATCH] python: support relative path in default database In-Reply-To: <20190419035659.28961-1-congdanhqx@gmail.com> References: <20190419035659.28961-1-congdanhqx@gmail.com> X-HGTTG: heart-of-gold From: David Edmondson Date: Sat, 20 Apr 2019 13:41:05 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Apr 2019 12:41:13 -0000 Looks good. Sorry for missing this. On Friday, 2019-04-19 at 10:56:59 +07, Doan Tran Cong Danh wrote: > From notmuch 0.28, notmuch support relative database path in > notmuch-config(1), but python binding haven't taught this yet. > > afew denied to work with a perfectly fine notmuch-config due to this. > --- > bindings/python/notmuch/database.py | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py > index 342d665a..88ca836e 100644 > --- a/bindings/python/notmuch/database.py > +++ b/bindings/python/notmuch/database.py > @@ -675,7 +675,10 @@ class Database(object): > if not config.has_option('database', 'path'): > raise NotmuchError(message="No DB path specified" > " and no user default found") > - return config.get('database', 'path') > + db_path = config.get('database', 'path') > + if not os.path.isabs(db_path): > + db_path = os.path.expanduser(os.path.join("~", db_path)) > + return db_path > > """notmuch_database_get_config""" > _get_config = nmlib.notmuch_database_get_config > -- > 2.21.0 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch dme. -- But are you safe Miss Gradenko?