From: Vitaly Kuznetsov <vitty@altlinux.org> To: ALT Linux Team development discussions <devel@lists.altlinux.org> Subject: Re: [devel] python.req error Date: Sat, 21 Oct 2017 08:32:15 +0200 Message-ID: <CAO_PtThP8OBNc8-O0PrNoSYm3zTAaOv9pt+PXaycgbAjK_MUcQ@mail.gmail.com> (raw) In-Reply-To: <558aa688-03e6-d324-f9d5-2118827f08ce@ya.ru> On Sat, Oct 21, 2017 at 8:12 AM, Антон Мидюков <midyukov-anton@ya.ru> wrote: > Подскажите, пожалуйста, что не понравилось в синтаксисе python.req: > > python.req: ERROR: > /usr/src/tmp/Uranium-buildroot/usr/lib/uranium/plugins/LocalFileOutputDevice/LocalFileOutputDevice.py: > invalid syntax (line 159) > Traceback (most recent call last): > File "/usr/lib/rpm/python.req.py", line 230, in <module> > lis = parser.suite('\n'.join(lines)+'\n').tolist(line_info=1) > File "<string>", line 159 > raise > OutputDeviceError.PermissionDeniedError(catalog.i18nc("@info:status Don't > translate the XML tags <filename>!", "Permission denied when trying to save > <filename>{0}</filename>").format(file_name)) from e > ^ > SyntaxError: invalid syntax > raise ... from - это конструкция Python3: $ python2 Python 2.7.13 (default, Sep 5 2017, 08:53:59) [GCC 7.1.1 20170622 (Red Hat 7.1.1-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> try: ... 1/0 ... except: ... raise RuntimeError("Something bad happened") from None File "<stdin>", line 4 raise RuntimeError("Something bad happened") from None ^ SyntaxError: invalid syntax $ python3 Python 3.6.2 (default, Oct 2 2017, 16:51:32) [GCC 7.2.1 20170915 (Red Hat 7.2.1-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> try: ... 1/0 ... except: ... raise RuntimeError("Something bad happened") from None ... Traceback (most recent call last): File "<stdin>", line 4, in <module> RuntimeError: Something bad happened https://docs.python.org/3/reference/simple_stmts.html#raise https://docs.python.org/2.7/reference/simple_stmts.html#raise
next prev parent reply other threads:[~2017-10-21 6:32 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-10-21 6:12 Антон Мидюков 2017-10-21 6:32 ` Vitaly Kuznetsov [this message] 2017-10-21 8:00 ` Антон Мидюков 2017-10-22 3:46 ` Антон Мидюков
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAO_PtThP8OBNc8-O0PrNoSYm3zTAaOv9pt+PXaycgbAjK_MUcQ@mail.gmail.com \ --to=vitty@altlinux.org \ --cc=devel@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git