コード例 #1
0
 def emptyResponse(self, key):
     if key == DriverData.NO:
         if self.no is None:
             self.no = '...'
     # if key== DriverData.NO_MOTOR:
     #     if self.noMotor is None:
     #         self.noMotor='...'
     if key == DriverData.NAMA:
         if self.nama is None:
             self.nama = '...'
     if key == DriverData.DESC:
         if self.desc is None:
             self.desc = '..'
     if key == DriverData.OJEK:
         if self.ojek is None:
             self.ojek = 'motor'
     if key == DriverData.LOKASI:
         if self.location is None:
             location = Location(126.951420, -5.708185)
             venue = Venue(location, '',
                           'alamat blm diset, silahkan perbarui dulu', None)
             self.location = toJson.toJson(venue)
     if key == DriverData.NAMA:
         if self.nama is None:
             self.nama = '.'
コード例 #2
0
ファイル: userData.py プロジェクト: indosandi/sanfrabot
 def setDari(self, dari):
     if (isinstance(dari, Venue)):
         print('TJOSON')
         self.dari = toJson.toJson(dari)
     else:
         print('NOTJOSON')
         self.dari = dari
コード例 #3
0
ファイル: userData.py プロジェクト: indosandi/sanfrabot
 def emptyResponse(self, key):
     if key == UserData.NO:
         if self.no is None:
             self.no = UserData.DEF_NO
     if key == UserData.DARI:
         if self.dari is None:
             location = Location(112.240727, -4.953413)
             venue = Venue(location, 'lokasi', UserData.DEF_DARI, None)
             self.dari = toJson.toJson(venue)
     if key == UserData.KE:
         if self.ke is None:
             location = Location(112.240727, -4.953413)
             venue = Venue(location, 'lokasi', UserData.DEF_KE, None)
             self.ke = toJson.toJson(venue)
     if key == UserData.HARGA:
         if self.harga is None:
             self.harga = UserData.DEF_HRG
     if key == UserData.OJEK:
         if self.ojek is None:
             self.ojek = UserData.DEF_OJK
     if key == UserData.NAMA:
         if self.nama is None:
             self.nama = UserData.DEF_NAME
コード例 #4
0
 def setLocation(self, venue):
     if (isinstance(venue, Venue)):
         self.location = toJson.toJson(venue)
     else:
         self.location = venue
コード例 #5
0
ファイル: userData.py プロジェクト: indosandi/sanfrabot
 def setKe(self, ke):
     if (isinstance(ke, Venue)):
         self.ke = toJson.toJson(ke)
     else:
         self.ke = ke