@@ -45,21 +45,6 @@ def skip_if_not_chrome(fn: CallableT) -> CallableT:
45
45
return fn
46
46
47
47
48
- def exception_swallower (
49
- function : Callable [[str , str ], str ]
50
- ) -> Callable [[str , str ], str ]:
51
- def wrapper (app_name : str , app_dir : str ) -> str :
52
- runtime_e : Exception | None = None
53
- try :
54
- return function (app_name , app_dir )
55
- except Exception as e :
56
- runtime_e = e
57
- if isinstance (runtime_e , Exception ):
58
- raise RuntimeError ("Failed to deploy to server." )
59
-
60
- return wrapper
61
-
62
-
63
48
def run_command (cmd : str ) -> str :
64
49
output = subprocess .run (
65
50
cmd ,
@@ -104,9 +89,6 @@ def deploy_to_connect(app_name: str, app_dir: str) -> str:
104
89
return url
105
90
106
91
107
- quiet_deploy_to_connect = exception_swallower (deploy_to_connect )
108
-
109
-
110
92
# TODO-future: Supress web browser from opening after deploying - https://github.com/rstudio/rsconnect-python/issues/462
111
93
def deploy_to_shinyapps (app_name : str , app_dir : str ) -> str :
112
94
# Deploy to shinyapps.io
@@ -115,9 +97,6 @@ def deploy_to_shinyapps(app_name: str, app_dir: str) -> str:
115
97
return f"https://{ name } .shinyapps.io/{ app_name } /"
116
98
117
99
118
- quiet_deploy_to_shinyapps = exception_swallower (deploy_to_shinyapps )
119
-
120
-
121
100
# Since connect parses python packages, we need to get latest version of shiny on HEAD
122
101
def write_requirements_txt (app_dir : str ) -> None :
123
102
app_requirements_file_path = os .path .join (app_dir , "app_requirements.txt" )
@@ -173,8 +152,8 @@ def deploy_app(
173
152
write_requirements_txt (tmp_app_dir )
174
153
175
154
deployment_function = {
176
- "connect" : quiet_deploy_to_connect ,
177
- "shinyapps" : quiet_deploy_to_shinyapps ,
155
+ "connect" : deploy_to_connect ,
156
+ "shinyapps" : deploy_to_shinyapps ,
178
157
}[location ]
179
158
180
159
pre_deployment_time = time .time ()
0 commit comments