コード例 #1
0
ファイル: diagnostics.py プロジェクト: LetsUnlockiPhone/Servo
def fetch_dc_url(request):
    from gsxws.diagnostics import Diagnostics
    GsxAccount.default(request.user)
    ship_to = request.user.location.gsx_shipto
    diags = Diagnostics(shipTo=ship_to)

    try:
        return redirect(diags.fetch_dc_url())
    except Exception as e:
        return messages.error(request, e)
コード例 #2
0
ファイル: device.py プロジェクト: luetgendorf/Servo
    def get_diagnostics(self, user):
        """
        Fetch GSX iOS or Repair diagnostics based on device type
        """
        GsxAccount.default(user)
        from gsxws.diagnostics import Diagnostics

        if len(self.imei):
            diags = Diagnostics(alternateDeviceId=self.imei)
        else:
            diags = Diagnostics(serialNumber=self.sn)

        diags.shipTo = user.location.gsx_shipto
        return diags.fetch()