File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -88,9 +88,7 @@ async def get_app_status(ctx: Context):
8888
8989 table = Table (title = 'Status' , header_style = 'purple' )
9090
91- status_list = [
92- attr for attr in dir (status ) if not attr .startswith ('__' )
93- ]
91+ status_list = status .__slots__
9492 for s in status_list :
9593 table .add_column (s .capitalize (), justify = 'center' )
9694 table .add_row (
@@ -160,7 +158,7 @@ async def app_data(ctx: Context):
160158 data : AppData = await client .app_data (app_id )
161159 table = Table (title = 'Status' , header_style = 'purple' )
162160
163- status_list = data .model_dump ( exclude_none = True )
161+ status_list = data .__slots__
164162 for s in status_list :
165163 table .add_column (s .capitalize (), justify = 'center' )
166164 table .add_row (
Original file line number Diff line number Diff line change 11import io
2+ import os
23from io import BytesIO
34
45import click
@@ -156,11 +157,12 @@ async def file_delete(ctx: Context, path: str):
156157@click .pass_context
157158@run_async
158159async def file_create (ctx : Context , file : io .BufferedReader , path : str ):
160+ name = os .path .basename (file .name )
159161 client : Client = ctx .obj ['client' ]
160162 app_id = ctx .obj ['app_id' ]
161- full_path = path + file . name
163+ full_path = path + name
162164 if path != '/' :
163- full_path = f'/{ path } /{ file . name } '
165+ full_path = f'/{ path } /{ name } '
164166 with Console ().status ('loading' ):
165167 response : Response = await client .create_app_file (
166168 app_id ,
You can’t perform that action at this time.
0 commit comments