File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1616# You should have received a copy of the GNU Lesser General Public License
1717# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
1818
19+ import os
1920import re
2021import shutil
2122from sys import argv
@@ -58,7 +59,9 @@ class Clean(Command):
5859 "pyrogram/api/errors/exceptions" ,
5960 "pyrogram/api/functions" ,
6061 "pyrogram/api/types" ,
61- "pyrogram/api/all.py"
62+ "pyrogram/api/all.py" ,
63+ "docs/source/functions" ,
64+ "docs/source/types"
6265 ]
6366
6467 user_options = []
@@ -71,9 +74,12 @@ def finalize_options(self):
7174
7275 def run (self ):
7376 for path in self .PATHS :
74- print ("removing {}" .format (path ))
75- shutil .rmtree (path , ignore_errors = True )
76-
77+ try :
78+ shutil .rmtree (path ) if os .path .isdir (path ) else os .remove (path )
79+ except OSError :
80+ print ("skipping {}" .format (path ))
81+ else :
82+ print ("removing {}" .format (path ))
7783
7884setup (
7985 name = "Pyrogram" ,
You can’t perform that action at this time.
0 commit comments