From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,NO_DNS_FOR_FROM, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from [192.168.1.3] (unknown [101.128.125.217]) by gnuweeb.org (Postfix) with ESMTPSA id 7EA8F8093B; Mon, 3 Oct 2022 23:33:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1664839993; bh=JNefFrS+KzPvi+pyQdBdWWS5CmAbxhGv+4SoSf4KS5E=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=bF5Try7QybVqUZt+/xTRgib3u4JRw1vOqLNd4KmHuMX27z1AIoE7yyhYEarx0jJ3M rS+BJs1dshLi6U1pSiwIN2134QMmADCTPWvIkn+1lfFQ+kDUd95zADA4a2/XEU+f5q xs2oClqPoMfRnM9FdrrEczBxvPdMVO7PztQnTG5ogRhoP1Si6xmjA0gLuuYFZAwNlU BAA9m9/5LnicJYPopkcPkcMmgNSYqqcLUDH9QRByxk5OTbz7hnz6kA8xruLf5BjZvz 6Z+FrGmvq+SfFJ2JIvUXVvDFawtngUgqyOQbNk5sU5N1tSp8WzBZAX6SRcEQKG4Ywa ZMBfoebpjJXKw== Message-ID: <9db5ceec-504a-8305-bcb4-19154312cf15@gnuweeb.org> Date: Tue, 4 Oct 2022 06:33:10 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH v1 00/26] The complete version of the Discord bot Content-Language: en-US To: Alviro Iskandar Setiawan Cc: Ammar Faizi , GNU/Weeb Mailing List References: <20221001130355.784-1-kiizuha@gnuweeb.org> <7c6e2632-b8b2-a7dd-f972-07b2b864c20a@gnuweeb.org> <611e7213-ab87-1d72-7cf2-ca465067a89c@gnuweeb.org> From: Muhammad Rizki In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: On 04/10/2022 06.22, Alviro Iskandar Setiawan wrote: > On Tue, Oct 4, 2022 at 6:18 AM Muhammad Rizki wrote: >> On 04/10/2022 06.12, Alviro Iskandar Setiawan wrote: >>> On Mon, Oct 3, 2022 at 7:48 PM Ammar Faizi wrote: >>>> Files are not deleted: >>>> >>>> ammarfaizi2@integral2:~/app/lore-daemon.dev/daemon$ ls dscord/storage -l >>>> total 0 >>>> drwxrwxr-x 1 ammarfaizi2 ammarfaizi2 78 Sep 3 17:25 23035eeb480f2b3501ba0841ef10ce3f >>>> drwxrwxr-x 1 ammarfaizi2 ammarfaizi2 12 Oct 3 19:42 6766c45fa800d71173893158b2c7d640 >>>> drwxrwxr-x 1 ammarfaizi2 ammarfaizi2 0 Sep 3 17:22 78380c23529749c280e4cca46f7519c9 >>>> drwxrwxr-x 1 ammarfaizi2 ammarfaizi2 0 Sep 3 17:23 a23e986acc2c75d08a3e98377f06bbfe >>>> drwxrwxr-x 1 ammarfaizi2 ammarfaizi2 356 Sep 3 17:22 b241bd7c932c70e6a81d107da019cb67 >>>> drwxrwxr-x 1 ammarfaizi2 ammarfaizi2 12 Sep 3 17:25 bcaac8364eaf04951d504faa1f1df826 >>>> drwxrwxr-x 1 ammarfaizi2 ammarfaizi2 0 Sep 3 17:23 c36cdede05b536d395c5b55dbae92288 >>>> ammarfaizi2@integral2:~/app/lore-daemon.dev/daemon$ >>> >>> bang, only 1 file from 3rd Oct, the rest are all old files from a >>> month ago, look at the date >>> >> >> Yes, this issue has already been a long time not fixed, because, in the >> past, I still don't know what caused it. Now, I think I see the problem. >> I've patched it and tested it. Wait until I send new PATCH email, thanks. > > the error Ammar reported could be the reason why the files are not > deleted, because if you hit an error, the code next to it won't be > executed, for ex: > > aaa() # error here > bbb() # this doesn't get executed > > you must use finally to handle this: > > try: > aaa() # error here > execpt: > pass > finally: > bbb() # it always gets executed > > but idk, i didn't investigate, just speculate > > -- Viro At first, I want to try what I just patched here then you guys review it, if it still bug, then I use the Python try:except: statement. I think that statement is not necessary.